function isWeiXin() {
  var ua = window.navigator.userAgent.toLowerCase();
  if (ua.match(/MicroMessenger/i) == "micromessenger") {
    return true;
  } else {
    return false;
  }
}
/**获取路径参数 */
function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i = 0; i < vars.length; i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) { return pair[1]; }
  }
  return (false);
}

// 获取城市名
let refer = document.referrer;


console.log(refer)
$.ajax({
  type: "GET",
  url: "http://houtai.wh.bendibao.com/fankui/index.php?ac=getCityName&url=" + refer,
  dataType: "json",
  success: function (res) {
    if (res.code === 0) {
      let city = res.data.cityname;
      localStorage.setItem("cityname", decodeURIComponent(city))
    }
  }
});



